file chooser: Avoid a crash
authorMatthias Clasen <mclasen@redhat.com>
Sun, 31 Jan 2016 04:07:56 +0000 (23:07 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 31 Jan 2016 04:07:56 +0000 (23:07 -0500)
commitf793da54a992d87da42c1f98e3cd5e9556c670ab
treec7ff9f2942889791442c06bda1009be61a62fdbb
parent6f74de53312cd8b874e5ad658171af4cdf372b12
file chooser: Avoid a crash

Since 39c2d12330b6d4405ca8a5599c12017c58626fcf,
priv->operation_mode == OPERATION_MODE_BROWSE no longer
guarantees that priv->browse_files_model is the current
model of the list - we are only switching the models after
loading the new directory. Avoid triggering the assertion
in show_and_select_files by checking if we have right model
before calling it.

https://bugzilla.gnome.org/show_bug.cgi?id=761209
gtk/gtkfilechooserwidget.c